package com.charles.video.api.feignService;

import com.charles.video.api.domain.SysMember;
import com.charles.video.api.feignFallBack.RemoteMemberFallbackFactory;
import com.charles.video.api.model.MemberLogin;
import com.charles.video.common.core.responseDomain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author Charles-H
 * 
 * 用户服务
 */
@FeignClient(contextId = "remoteMemberService", value = "video-system", fallbackFactory = RemoteMemberFallbackFactory.class)
public interface RemoteMemberService {
    /**
     * 通过成员工号获取成员信息
     * @param memberNum 成员工号
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/member/info/{memberNum}")
    public R<MemberLogin> getMemberInfo(@PathVariable("memberNum") String memberNum, @RequestHeader("from-source") String source);
    
    @PostMapping("/member/recordLoginTime")
    public void recordLoginTime(@RequestBody SysMember sysMember, @RequestHeader("from-source") String source);

}
